package cn.seaboot.commons.lang;

/**
 * Represents a function that accepts one argument and produces a result.
 *
 * <p>This is a <a href="package-summary.html">functional interface</a>
 * whose functional method is {@link #map(Object)}.
 *
 * @param <T> the type of the input to the function
 * @param <R> the type of the result of the function
 * @author Mr.css
 * @version 2022-12-12 19:14
 * @since 1.8
 */
@FunctionalInterface
public interface MFunction<T, R> {

    /**
     * Applies this function to the given argument.
     *
     * @param t the function argument
     * @return the function result
     */
    R map(T t) throws Exception;
}